<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: xilskey_eps_zynqmp.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilskey__eps__zynqmp_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xilskey_eps_zynqmp.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the PS eFUSE API's of ZynqMp to program/read the eFUSE array. </p>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>MODIFICATION HISTORY:</p>
<p>Ver Who Date Changes </p>
<hr/>
<p> 4.0 vns 10/01/15 First release vns 10/20/15 Modified XilSKey_ZynqMp_EfusePs_ReadSecCtrlBits API when reading from efuse memory to return both bits of secure control feature for RSA enable, PPK hash bits invalid bits. 6.0 vns 07/18/16 PR #1968, Provided User FUSEs single bit programming Removed JTAG User code programming and reading feature. Added temperature and voltage checks, while programming and reading eFUSE array. Added separate function to set timing parameters and sysmon PSU driver initialization. Added init function while from eFUSE. Added appropriate error codes on failure returns. vns 08/24/16 Fixed eFUSE ZynqMP programming by adding unlocking before eFUSE PS initialization. 6.2 vns 02/18/17 Added margin reads for verifying, added CRC check, Removed temperature checks for each bit. Added temperature checks in all read APIs. 6.4 vns 02/19/18 Added efuse cache reload call in function <a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b46f3a03d5163f08b7782f669a78748" title="This function is used to program the PS eFUSE of ZynqMP, based on user inputs. ">XilSKey_ZynqMp_EfusePs_Write()</a>, so on successful efuse programming, programmed fuses can directly read from cache of the efuse. 6.6 vns 06/06/18 Added doxygen tags vns 09/18/18 Added APIs to support eFUSE programming from linux vns 10/11/18 Added support to re-program non-zero SPKID 6.7 arc 01/05/19 Fixed MISRA-C violations. arc 25/02/19 Added NULL checks and validations for input params and add timeouts and status info arc 03/15/19 Modified initial default status value as XST_FAILURE 6.7 psl 03/21/19 Fixed MISRA-C violation. 6.8 psl 06/07/19 Added doxygen tags psl 06/25/19 Fixed Coverity warnings. psl 06/28/19 Added doxygen tags. psl 07/05/19 Added Asserts for validation. psl 07/12/19 Corrected length of data to read for XilSKey_EfusePs_ConvertBytesBeToLe function. psl 07/23/19 Fixed input validations. vns 08/07/19 Fixed CTRL LOCK in XilSKey_ZynqMp_EfusePs_ReadSecCtrlBits psl 08/13/19 Fixed MISRA-C violation vns 08/29/19 Initialized Status variables vns 09/17/19 Removed Tbits programming from library as they are to be programmed under manufacturing list. 6.9 kpt 02/16/20 Fixed coverity warnings 02/27/20 Added Error codes in XilSKey_ZynqMp_EfusePs_WriteBit 02/27/20 Removed extra ppk hash zeroes checking in XilSKey_ZynqMp_EfusePs_Write 03/18/20 Replaced while loop with Xil_WaitForEvents in XilSKey_ZynqMp_EfusePs_WriteBit, XilSKey_ZynqMp_EfusePs_ReadRow. vns 03/18/20 Fixed Armcc compilation errors kal 03/18/20 Removed Temp and Voltage check while checking AES key CRC. kal 03/20/20 Removed Temp and Voltage checks for eFuse reads. kpt 03/17/20 Replaced direct eFuse reads with cache reads and Error code is returned when user chooses read option as eFuse. ana 04/07/20 Removed IsPpk0Sha3Hash and IsPpk1Sha3Hash variabes, as these are not required with only sha3 support. kal 04/09/20 Added Temp and Voltage checks before unlocking the controller. 7.0 kal 06/04/20 Fixed XilSKey_ZynqMp_EfusePs_CheckAesKeyCrc return Status in case of success. am 10/04/20 Resolved MISRA C violations 7.1 am 11/29/20 Resolved MISRA C violations kal 03/14/21 Added eFuse classification for eFuse read/write IPI requests kpt 05/11/21 Added Baremetal support for programming PUF Fuses as general purpose data kpt 05/21/21 Added support to allow PPK Hash programming multiple times 7.2 am 07/13/21 Fixed doxygen warnings 7.7 kal 04/09/25 Update XilSKey_ZynqMp_EfusePs_Write_UsrCtrlBits to return Success in case the request is to program already programmed eFuses.</p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5b46f3a03d5163f08b7782f669a78748"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b46f3a03d5163f08b7782f669a78748">XilSKey_ZynqMp_EfusePs_Write</a> (XilSKey_ZynqMpEPs *InstancePtr)</td></tr>
<tr class="memdesc:ga5b46f3a03d5163f08b7782f669a78748"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to program the PS eFUSE of ZynqMP, based on user inputs.  <a href="group__xilskey__zynqmp__efuse.html#ga5b46f3a03d5163f08b7782f669a78748">More...</a><br/></td></tr>
<tr class="separator:ga5b46f3a03d5163f08b7782f669a78748"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe8ae7aba73e1e4b667aed0bad8f64aa"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gafe8ae7aba73e1e4b667aed0bad8f64aa">XilSKey_ZynqMp_EfusePs_ReadSecCtrlBits</a> (XilSKey_SecCtrlBits *ReadBackSecCtrlBits, u8 ReadOption)</td></tr>
<tr class="memdesc:gafe8ae7aba73e1e4b667aed0bad8f64aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read the PS eFUSE secure control bits from cache or eFUSE based on user input provided.  <a href="group__xilskey__zynqmp__efuse.html#gafe8ae7aba73e1e4b667aed0bad8f64aa">More...</a><br/></td></tr>
<tr class="separator:gafe8ae7aba73e1e4b667aed0bad8f64aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga481698e87679ed2fbabb51ae433e2998"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga481698e87679ed2fbabb51ae433e2998">XilSKey_ZynqMp_EfusePs_WriteAndVerifyBit</a> (u8 Row, u8 Column, XskEfusePs_Type EfuseType)</td></tr>
<tr class="memdesc:ga481698e87679ed2fbabb51ae433e2998"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function programs and verifies the particular bit of eFUSE array.  <a href="group__xilskey__zynqmp__efuse.html#ga481698e87679ed2fbabb51ae433e2998">More...</a><br/></td></tr>
<tr class="separator:ga481698e87679ed2fbabb51ae433e2998"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5ccf425dc11a9659dd31419233c1382b"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga5ccf425dc11a9659dd31419233c1382b">XilSKey_ZynqMp_EfusePs_ReadRow</a> (u8 Row, XskEfusePs_Type EfuseType, u32 *RowData)</td></tr>
<tr class="memdesc:ga5ccf425dc11a9659dd31419233c1382b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns particular row data directly from eFUSE array.  <a href="group__xilskey__zynqmp__efuse.html#ga5ccf425dc11a9659dd31419233c1382b">More...</a><br/></td></tr>
<tr class="separator:ga5ccf425dc11a9659dd31419233c1382b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaba4a03dfa30f51139e6db70eac6583be"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gaba4a03dfa30f51139e6db70eac6583be">XilSKey_ZynqMp_EfusePs_CacheLoad</a> (void)</td></tr>
<tr class="memdesc:gaba4a03dfa30f51139e6db70eac6583be"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reloads the cache of eFUSE so that can be directly read from cache.  <a href="group__xilskey__zynqmp__efuse.html#gaba4a03dfa30f51139e6db70eac6583be">More...</a><br/></td></tr>
<tr class="separator:gaba4a03dfa30f51139e6db70eac6583be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0bbd694e7fdef850812aeccbf6da42a8"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga0bbd694e7fdef850812aeccbf6da42a8">XilSKey_ZynqMp_EfusePs_SetWriteConditions</a> (void)</td></tr>
<tr class="memdesc:ga0bbd694e7fdef850812aeccbf6da42a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets all the required parameters to program eFUSE array.  <a href="group__xilskey__zynqmp__efuse.html#ga0bbd694e7fdef850812aeccbf6da42a8">More...</a><br/></td></tr>
<tr class="separator:ga0bbd694e7fdef850812aeccbf6da42a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga32901f95760a2e693f484f5a57d1ad06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga32901f95760a2e693f484f5a57d1ad06">XilSKey_ZynqMp_EfusePs_SetTimerValues</a> (void)</td></tr>
<tr class="memdesc:ga32901f95760a2e693f484f5a57d1ad06"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets timers for programming and reading from eFUSE.  <a href="group__xilskey__zynqmp__efuse.html#ga32901f95760a2e693f484f5a57d1ad06">More...</a><br/></td></tr>
<tr class="separator:ga32901f95760a2e693f484f5a57d1ad06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1456bb1e5601881e5064de0adcfc999e"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga1456bb1e5601881e5064de0adcfc999e">XilSKey_ZynqMp_EfusePs_CheckAesKeyCrc</a> (u32 CrcValue)</td></tr>
<tr class="memdesc:ga1456bb1e5601881e5064de0adcfc999e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs the CRC check of AES key.  <a href="group__xilskey__zynqmp__efuse.html#ga1456bb1e5601881e5064de0adcfc999e">More...</a><br/></td></tr>
<tr class="separator:ga1456bb1e5601881e5064de0adcfc999e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e3922cb096a5f9d79ca4ebb3080ecae"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga6e3922cb096a5f9d79ca4ebb3080ecae">XilSKey_ZynqMp_EfusePs_ReadUserFuse</a> (u32 *UseFusePtr, u8 UserFuse_Num, u8 ReadOption)</td></tr>
<tr class="memdesc:ga6e3922cb096a5f9d79ca4ebb3080ecae"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read a user fuse from the eFUSE or cache.  <a href="group__xilskey__zynqmp__efuse.html#ga6e3922cb096a5f9d79ca4ebb3080ecae">More...</a><br/></td></tr>
<tr class="separator:ga6e3922cb096a5f9d79ca4ebb3080ecae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga56fb70c1fe6c73dc49f0a4366b891efe"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga56fb70c1fe6c73dc49f0a4366b891efe">XilSKey_ZynqMp_EfusePs_ReadPpk0Hash</a> (u32 *Ppk0Hash, u8 ReadOption)</td></tr>
<tr class="memdesc:ga56fb70c1fe6c73dc49f0a4366b891efe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read the PPK0 hash from an eFUSE or eFUSE cache.  <a href="group__xilskey__zynqmp__efuse.html#ga56fb70c1fe6c73dc49f0a4366b891efe">More...</a><br/></td></tr>
<tr class="separator:ga56fb70c1fe6c73dc49f0a4366b891efe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2d6c621edaf9dc92652e650a6faceaf9"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga2d6c621edaf9dc92652e650a6faceaf9">XilSKey_ZynqMp_EfusePs_ReadPpk1Hash</a> (u32 *Ppk1Hash, u8 ReadOption)</td></tr>
<tr class="memdesc:ga2d6c621edaf9dc92652e650a6faceaf9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read the PPK1 hash from eFUSE or cache.  <a href="group__xilskey__zynqmp__efuse.html#ga2d6c621edaf9dc92652e650a6faceaf9">More...</a><br/></td></tr>
<tr class="separator:ga2d6c621edaf9dc92652e650a6faceaf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf32df4375d96c29c860c68670fecba41"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gaf32df4375d96c29c860c68670fecba41">XilSKey_ZynqMp_EfusePs_ReadSpkId</a> (u32 *SpkId, u8 ReadOption)</td></tr>
<tr class="memdesc:gaf32df4375d96c29c860c68670fecba41"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read SPKID from eFUSE or cache based on user's read option.  <a href="group__xilskey__zynqmp__efuse.html#gaf32df4375d96c29c860c68670fecba41">More...</a><br/></td></tr>
<tr class="separator:gaf32df4375d96c29c860c68670fecba41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4ce06d6fa81a7374a6bc03c566303a5f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga4ce06d6fa81a7374a6bc03c566303a5f">XilSKey_ZynqMp_EfusePs_ReadDna</a> (u32 *DnaRead)</td></tr>
<tr class="memdesc:ga4ce06d6fa81a7374a6bc03c566303a5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read DNA from eFUSE.  <a href="group__xilskey__zynqmp__efuse.html#ga4ce06d6fa81a7374a6bc03c566303a5f">More...</a><br/></td></tr>
<tr class="separator:ga4ce06d6fa81a7374a6bc03c566303a5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5467284f0486d3afa7953eb51876757b"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga5467284f0486d3afa7953eb51876757b">XilSKey_ZynqMp_EfusePs_CheckForZeros</a> (u8 RowStart, u8 RowEnd, XskEfusePs_Type EfuseType)</td></tr>
<tr class="memdesc:ga5467284f0486d3afa7953eb51876757b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used verify eFUSE keys for Zeros.  <a href="group__xilskey__zynqmp__efuse.html#ga5467284f0486d3afa7953eb51876757b">More...</a><br/></td></tr>
<tr class="separator:ga5467284f0486d3afa7953eb51876757b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabbf6b819a248562326af345bd43947c9"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gabbf6b819a248562326af345bd43947c9">XilSKey_ZynqMp_EfusePs_Init</a> (void)</td></tr>
<tr class="memdesc:gabbf6b819a248562326af345bd43947c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes sysmonpsu driver.  <a href="group__xilskey__zynqmp__efuse.html#gabbf6b819a248562326af345bd43947c9">More...</a><br/></td></tr>
<tr class="separator:gabbf6b819a248562326af345bd43947c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf92ce5c0ea8ffaa5e15fc9125ae3363f"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gaf92ce5c0ea8ffaa5e15fc9125ae3363f">XilSkey_ZynqMpEfuseAccess</a> (const u32 AddrHigh, const u32 AddrLow)</td></tr>
<tr class="memdesc:gaf92ce5c0ea8ffaa5e15fc9125ae3363f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used by PMUFW IPI call handler for programming eFUSE.  <a href="group__xilskey__zynqmp__efuse.html#gaf92ce5c0ea8ffaa5e15fc9125ae3363f">More...</a><br/></td></tr>
<tr class="separator:gaf92ce5c0ea8ffaa5e15fc9125ae3363f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">API declarations</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>  </p>
</div></td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
